Identification of semantically relevant concepts in a graphical model

ABSTRACT

In an embodiment, a plurality of graphical elements of a graphical model may be displayed on a display device. An indication of a graphical operation involving a first graphical element of the plurality of graphical elements may be received. The graphical operation when performed may establish a relationship between the first graphical element and one or more other graphical elements of the plurality of graphical elements that are compatible with the graphical operation. Two or more graphical elements of the plurality of graphical elements that are compatible with the graphical operation and one or more characteristics associated with the first graphical element may be identified. A visual indication may be provided on the display device. The visual indication may indicate that the identified plurality of graphical elements is compatible with the graphical operation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a portion of an exemplary graphical model of a system.

FIG. 2 depicts a graphical model of a system showing an invalid targetobject for a graphical operation.

FIG. 3 depicts a graphical model of a system after a selection of asource object for a graphical operation.

FIG. 4 depicts a graphical model of a system with semantically relevanttarget objects highlighted.

FIG. 5A is a flow chart visually depicting exemplary acts that may beused to emphasize semantically relevant concepts in a graphical model ofa system.

FIG. 5B graphically depicts properties referred to in act 530 of FIG.5A.

FIG. 5C depicts act 530 of FIG. 5A in more detail.

FIG. 6 depicts a graphical model of a system performing a graphicaloperation that may involve querying for semantically relevant targetobjects.

FIG. 7 depicts the graphical model of a system of FIG. 6, where the typeof graphical operation is changed during a selection process.

FIG. 8A depicts an electronic device that may be suitable for use withthe one or more embodiments disclosed herein.

FIG. 8B depicts a modeling environment that may be suitable for use withone or more embodiments disclosed herein.

FIG. 9 depicts a network implementation that may be suitable for usewith one or more embodiments disclosed herein.

DETAILED DESCRIPTION

Dynamic systems may include systems whose behaviors typically changeover time. Dynamic systems may be representative of many real-worldsystems, such as a control system, a media processing system, apendulum, a bouncing ball, or a car. It is often desirable to create amodel of a dynamic system so that predictions can be made regarding thebehavior of the system without the need to construct or test areal-world version of the dynamic system.

Graphical modeling environments may be programs that may enable, forexample, a user to construct and analyze a graphical model of a processor system. Examples of graphical modeling environments may include, forexample, time-based block diagram environments, such as Simulink®available from MathWorks Inc., Natick, Mass., discrete event diagramenvironments and state machine diagram environments, such as those foundwithin Stateflow®, also available from MathWorks, Inc., data-flowdiagram environments, such as LabVIEW, available from NationalInstruments Corporation, Austin, Tex., and diagramming environments,such as Unified Modeling Language (UML) diagramming environments, andother graphical modeling environments.

Graphical modeling has become a common technique for designing models ofdynamic systems because graphical modeling software packages typicallyprovide sophisticated software platforms that may include a rich suiteof support tools that makes the analysis and design of dynamic systemsusing models efficient, methodical, and cost-effective. A graphicalmodel may include one or more graphical elements that together mayrepresent a dynamic system. Historically, engineers, scientists, andother professionals have utilized graphical models in numerous areassuch as feedback control theory and signal processing, finance,mathematics, and/or other areas to study, design, debug, and refinedynamic systems associated with those areas.

Graphical models may be event-driven, data-driven, or time-driven, amongother possibilities. A graphical model may also be constructed using acombination of time-driven, event-driven, and data-driven elements.These elements may include one or more nodes. The nodes may beinterconnected by one or more lines. The nodes and lines may havedifferent semantic meanings depending on a number of factors. Thesefactors may include, for example, which type of graphical model they areused in and how they are used in the graphical model.

Some or all nodes in an event-driven graphical model may react to one ormore events, which may occur in a system represented by the model. Themodel may contain (1) one or more nodes which may represent one or morestates in the system and (2) one or more lines (sometimes represented asarrows) which may represent one or more transitions between states inthe system. An example of an event-driven graphical model may include aStateflow® statechart. A Stateflow® statechart may be used to model afinite state machine in the Stateflow® environment. Nodes in theStateflow® statechart may represent one or more states in the statemachine. Lines in the Stateflow® statechart may represent transitionsbetween the states.

Data-driven graphical models may represent processes which may transformdata within a system and may capture how data flows into, out of, and/orwithin the system. An example of a data-driven graphical model may be adata flow diagram. Nodes in a data flow diagram may represent, forexample, entities or processes. Lines in a flow diagram (sometimesrepresented as arrows) may represent, for example, data flows betweenentities and/or processes.

In a time-driven graphical model, a simulation or execution of thegraphical model may be driven by a clock. Some or all of the nodes of atime-driven graphical model may be sampled for data at regular orirregular time intervals. Nodes in a time-driven graphical model mayperform computations on data and generate results from the computations.The results may be output from the nodes as output data. In blockdiagram models, the nodes may be represented by blocks which may, amongother things, perform computations and generate output data. Lines in atime-driven graphical model may represent one or more signals, which maycarry data between blocks.

It is worth noting that block diagrams may be used by many differentmodels of computation. For example, in Stateflow® from MathWorks, Inc.,flow charts may be represented as block diagrams that may be used tocapture behavior of reactive systems and process flow.

During a design of a graphical model, the model may be manipulatedthrough various graphical operations. Graphical operations may include amanipulation of one or more objects (e.g., nodes, lines) in a visualrepresentation of a graphical model, as well as other operations thatmay be graphically indicated in the modeling environment. For example, auser may specify that data should be provided from one or more sourcenodes in a model to one or more target nodes in the model by connectingthe source nodes and target nodes with one or more lines. However, notevery target node may be a valid target for a given source node, or fora given graphical operation in a given modeling environment. A targetnode may be incompatible with a source node based on data types, samplerates, or other criteria that may be associated with the blocks.

Connecting a source node in a model to an incompatible target node inthe model may cause errors. In some models, especially complex models,it may be difficult for a user to identify which target nodes in themodel are semantically valid targets for particular source nodes in themodel. As a result, it may be difficult to avoid introducing errors inthe models, which may be caused by improperly connecting source nodes toincompatible target nodes.

A semantically relevant target may include a target that may be suitablefor, or compatible with, a particular source or graphical operation,given the particular semantic context of the source, the target, thegraphical operation, and/or a model of which they may be a part. Thesemantical relevance may vary in degree as an adaptation such as, forexample, a data type cast, may be required between the source and targetof the connection. The semantical relevance may be further refined basedon the functional effect of the adaptation such as, for example, whetherthe data type case results in loss of information or not and howextensive the loss of information is. A semantically relevant target maybe capable of receiving a graphical operation from the source andaccurately interpreting information provided by the source. The sourceand/or target may be nodes.

A semantically relevant target of a source may be identified andhighlighted, or semantically irrelevant target of a source may be, forexample, diminished or annotated. The identification may account for thedegree of semantical relevance, for example, a connection to a targetthat requires a data type conversion may be highlighted in a differentcolor or annotated differently than a target that does not require adata type conversion or that requires a different data type conversion.The capability to highlight, diminish, annotate, or indicate semanticalrelevance in another manner may guide a user in choosing semanticallyrelevant choices during a graphical operation, or to group complex andseemingly unrelated items together in response to a query or state.

One or more embodiments may be discussed in connection with graphicalblock diagram models created and executed in the Simulink® environment(hereinafter “Simulink”). The present invention may be implemented in anumber of different applications and embodiments and is not specificallylimited in its application to particular embodiments described herein.For example, the present invention is not limited to block diagrammodels, but rather may be used with other types of models. Furthermore,the present invention is not limited to the particular environmentsdescribed herein and may be used with other suitable environments.

Graphical models may be models that may include one or more graphicalelements. Together the graphical elements may represent a dynamicsystem. Graphical models may be represented in a graphical programminglanguage, such as a source model language. Examples of source modellanguages include Simulink and Unified Modeling Language (UML), amongothers. In some cases, a graphical model may be an executable graphicalmodel or a simulatable graphical model. Execution and simulation will bediscussed in more detail below with respect to FIG. 8.

A graphical model may include one or more graphical elements. Graphicalelements may include, but are not limited to, textual or graphicalannotations, blocks, states, ports, and lines.

Textual or graphical annotations include text or graphics which areadded to a graphical model, typically to assist a user or designer inunderstanding portions of the model. In many cases, textual andgraphical annotations do not affect the underlying operation of thegraphical model. In other cases, textual annotations may, for example,be formulated in an action language to specify operations performed bythe model.

Blocks and states are two examples of nodes. Nodes may generallydescribe one or more computations, among other things. Nodes may haveone or more distinct inputs and/or outputs. The inputs and/or output maybe generally referred to as ports.

Nodes may have a semantic meaning; that is, a node may have a particularmeaning in the context of the graphical model in which it occurs. Insome cases, this semantic meaning may arise from the fact that a nodemay describe one or more computations. It is also possible for othergraphical elements, such as lines, to have semantic meaning. Thissemantic meaning may vary depending on a context in which a graphicalmodel is employed. For example, graphical models may be provided in anumber of different domains, such as time-based block diagrams,event-based statecharts, and data-based data flow diagrams. The semanticmeaning of the graphical elements, such as nodes and lines, may bedifferent in each domain.

In time-based block diagrams, lines may represent signal quantities thatmay vary with time (e.g., data signals) and the nodes are blocks thatmay represent one or more components of a dynamic system (e.g.,components of a controller). The signals may form a time-baseddependency between the blocks. The signal quantities may have theircomputational causality explicitly specified or this causality may beautomatically inferred. For example, an equation may prescribe arelation between two variables without explicitly stating thecomputational causality, or, which of the two variables is computedfirst. Based on further relations in the model, this causality may beinferred, for example by sorting the equations using a Gaussianelimination scheme.

A semantic behavior in a discrete-event system may differ from asemantic behavior of the time-based model. For example, in adiscrete-event system, the lines may represent transitions by whichactivity status transfers from node to node. Each node in adiscrete-event system, which may generally be referred to as a state,may represent an action that may be performed on an entity. Moreover, astate in a discrete-event system may represent a mode of the discreteevent-driven system.

A state may be (1) a part of a finite state machine or (2) a statechartthat may represent a finite state machine. A statechart may be anotherexample of a graphical model. A statechart may be created in astatechart environment, such as (but not limited to) Stateflow® which isavailable from MathWorks, Inc. States or statecharts may be embeddedand/or referenced in block diagram models.

Another example of a graphical model may be a data flow diagram. In adata flow diagram, blocks may represent operations and lines mayrepresent values or they may represent entity paths by which entitiesmay travel from node to node. The entities may be of different types andmay contain one or more attributes that may be of different type. Blocksmay be executed based upon data availability.

Another example of a graphical model may be a class diagram. In a classdiagram, blocks may represent class and objects and lines may representrelations such as aggregation, association, inheritance, etc. Blocks maycontain variables and methods that may be called based on a call graph.

FIG. 1 illustrates portions of a block diagram model 100 that may becreated using a diagramming application. The block diagram model 100 isone example of a graphical model that may be used in a time-baseddomain. The block diagram model 100 may be a graphical entity that mayhave an “executable meaning”. The block diagram model 100 may be used tomodel a dynamic system. A block diagram model may accept one or moreinputs and may generate one or more outputs based on, for example, theinputs, a current state of a system being modeled, and time.

Block diagram models may include one or more graphical elements. Blocksin a block diagram model may be drawn using some form of geometricobject (e.g., circle, rectangle, etc.). A block in the block diagram 100may represent an elemental dynamic system. A block may be an element ofa time-based system which may receive inputs, execute functions, performcomputations, generate outputs, or carry out a combination of thesecapabilities or other capabilities. The illustrative block diagram 100includes a source block 102, a destination block 104, and a block 106.

Ports, such as the input port 108 of the destination block 104 and theoutput port 110 of the source block 102, may refer to distinct inputs oroutputs on a graphical element (such as a block). Ports may be interfaceports, flow ports (for example, flow ports from SysML), client-serverports, or other types of ports.

The flow of data through a system may be denoted by lines connectingblocks through ports, and may represent the input and/or output of thesystem. The lines may be referred to as “signals.” A signal maycorrespond to a time-varying quantity. A signal may be represented by aline connection and may have a particular value at a particular timeinstant. A line emanating at a first block and terminating at a secondblock may signify that the output of the first block is an input to thesecond block. A source block of a signal may write a signal at a giventime instant when the source block's equations are solved. A targetblock of the signal may read the signal when the target block'sequations are being solved.

For example, the block diagram 100 is represented schematically as afirst collection of graphical elements (in this case, blocks 102, 104,106) that are interconnected by a set of lines, which represent logicalconnections between the blocks. In the block diagram 100 a line 112connects a port 110 of the source block 102 to a port 108 of thedestination block 104. Data from the source block 102 may pass to thedestination block 104 via the line 112.

Block diagram models may be represented as a series of differentialequations. These differential equations may describe a behavior of adynamic system represented by the block diagram model. Furthermore, ablock in a block diagram model may be associated with one or more statevariables and one or more equations utilizing the state variables. Theequations may define a relationship between the input signals, outputsignals, state variables, and time for an elemental dynamic systemrepresented by the block. Inherent in the definition of the relationshipbetween the signals and the state variables may be the notion ofparameters, which may be coefficients of equations describing the systemor individual blocks.

For example, in the block diagram 100 blocks 102, 104, and 106 may eachrepresent an elemental dynamic system, and the relationships betweensignals and state variables may be defined by sets of equationsrepresented by the blocks 102, 104, 106. Note that the term “block” maynot refer exclusively to an elemental dynamic system but may also referto other modeling elements, such as elements that may be used to aid inreadability and/or elements that may be used to aid in the modularity ofblock diagrams. For example, the term “block” may be used to refer to avirtual block. Virtual blocks are typically used to improve readabilityof a block diagram. Virtual blocks may differ from certain other typesof blocks in that virtual blocks are typically not executed whereas theother types of blocks may be executed.

Also note that the block diagram 100 is merely illustrative of a typicalapplication and is not intended to limit the present invention in anyway. For example, blocks may be visually depicted in any geometricshape, and connections between blocks may be made using means other thana line.

Graphical models, such as the graphical block diagram model 100, may bedesigned in a graphical modeling environment in a model design process.During a model design process, a user may perform a graphical operationin the graphical modeling environment. Graphical operations may includea manipulation of one or more graphical elements (e.g., blocks, lines)in a visual representation of a graphical model, as well as otheroperations that may be graphically indicated in the modelingenvironment. For example, a user may connect two or more ports 108, 110using one or more line segments 112. Connecting two or more ports is oneexample of a graphical operation. Other examples of graphical operationsmay include the addition or deletion of graphical elements from thegraphical model, and modifying a graphical element (such as a graphicalblock) using a graphical interface.

Some graphical operations may involve a source and a target. Connectingan input port to an output port using a line is one example of agraphical operation involving a source (the output port) and a target(the input port). For example, FIG. 2 depicts a portion of a blockdiagram model 200 having two blocks 202, 204. Each block includes anumber of ports, such as the input ports 206, 208. There may also be anumber of output ports 210-224 in the model. All of the output ports210-224 may be provided on a single block in the model, or the outputports 210-224 may be divided among different blocks in the model.Alternatively, some or all of the output ports 210-224 may not beassociated with any blocks; they may be provided separately from anyblock in the model.

A graphical operation may be performed on a particular source/targetcombination. For example, in the graphical model 200 of FIG. 2, outputport 210 may output data which may be consumed or processed bydestination block 202. Accordingly, a user may wish to connect outputport 210 to an input port of the destination block 202 using a line. Theuser may perform a graphical operation to connect the output port 210with an input port on destination block 202, for example, using themouse cursor 226. For example, the user may drag a line 228 from theoutput port 210 to the input port 208 of the destination block 202 inorder to indicate that data from the output port 210 should be used asinput of the input port 208.

A particular graphical operation may not necessarily be a semanticallyrelevant option for a specific source/target combination. For example,some graphical operations may require particular types of sources ortargets, or both. In addition, some sources may require particular typesof targets; thus, a graphical operation that may otherwise be compatiblewith a particular source may be rendered invalid if, for example, thetarget of the graphical operation is not compatible with the source.Generally, one or more properties of a source, destination, or graphicaloperation may determine which combinations of sources, destinations, andgraphical operations are compatible.

For example, in FIG. 2 output port 210 may provide output data of aparticular data type. A user may wish to provide the data of output port210 to the block 202 using the input port 208. The user may accordinglyattempt to establish a line 228 connecting output port 210 with inputport 208 using a graphical operation. However, input port 208 may be setup to receive incoming data of a data type that may be different and/orincompatible with the data supplied by output port 210. Accordingly,input port 208 may not be a valid target for the graphical operation.

As shown in FIG. 2, the user has selected output port 210 and moved thecursor 226 to the desired input port 208. However, because, as notedabove, input port 208 is not a valid target for the graphical operationan error occurs when the input port 208 is identified as a target forthe graphical operation. This error may be reflected by changing avisual representation of input port 208 to show that input port 208 isincompatible with the graphical operation. For example, in FIG. 2, inputport 208 is changed to display an “X.” Alternatively, color, size,shape, or some other feature of input port 208 could be changed, and/ora message (e.g., a pop-up message) that may describe the incompatibilitymay appear. Numerous visual cues may be employed to indicate theincompatibility. The incompatibility may be indicated on the input port208, the line 228, the output port 210, and by another indicator. Inanother alternative, an expected change of some feature of input port208 or of the line 228 may not occur. For example, an open arrow headthat would change to solid when input port 208 is a valid target may notoccur.

In FIG. 2, input port 208 may be set up to receive incoming data of adata type that may be different from the data supplied by output port210 but that can be converted by a data type cast (for example, aninteger to a double). Accordingly, input port 208 may be a valid targetfor the graphical operation but with a lesser degree of compatibility.Alternatively, the data type cast may lose information (for example, adouble to an integer). Accordingly, input port 208 may be a valid targetfor the graphical operation but with a yet lesser degree ofcompatibility. This degree of compatibility may be reflected by changinga visual representation of input port 208, line 228, output port 210,and by another indicator. For example, a color attribute such as ‘red’in the RGB encoding may vary across a given range of 0 to 255 accordingto a degree of compatibility. Alternatively, annotations may indicatethe adaptation required.

The degree of compatibility may be of a partial order, for example, whenthe incoming data type is composed of two data types, one of which mayrequire a data type conversion when data for input port 208 is suppliedby output port 210 and the other of which may require a data typeconversion when data for input port 206 is supplied by output port 210.In case the two data type conversions are different, the informationabout the partial ordering may be indicated, for example, by a pop upannotation on the graphical model. Alternatively, a metric over the twodata type conversions may be supplied (for example, a conversion fromBoolean to integer contributes less to the degree of compatibility thana conversion from integer to double) to create a total order.

In FIG. 2, an incompatibility may be shown when the user identifies theintended target of the graphical operation (e.g., when the user “mousesover” the input port 208 with the cursor 226). In some circumstances, itmay be desirable to identify one or more valid potential targets for agraphical operation after a source of the graphical operation and/or thegraphical operation itself has been identified. For example, it may becumbersome to require that a user identify a particular target beforethat target is identified as valid or invalid. In some cases, it may bedesirable to identify some or all valid targets for a graphicaloperation after the graphical operation and/or source is identified.Visual cues may provide an indication of compatibility.

Although, as indicated in FIG. 2, input port 208 is not a valid targetfor the graphical operation (i.e., connecting output port 210 using aline 228), a different input port 206 may be compatible with thegraphical operation. One or more valid targets may be determined afterthe source is selected and/or the graphical operation is identified,based on the properties of the source and/or the graphical operation.

In one embodiment, the source and target ports associate with variablesof constraints. These constraints may be noncausal equations such as inmodels of physical systems. For example, Ohm's Law states that thevoltage drop, V, across a resistance equals the current, I, through theresistance times the resistance value, R, or V=R*I. This equation doesnot state its causality, i.e., whether V is computed from I or I from V,which depends on how the resistance is connected. The causality can beinferred automatically from the resistance connections.

In another embodiment, the ports may not be shown as graphical elements,for example, in the case of a state transition diagram or a classdiagram. The source and target block may behave similar to the portbehavior description.

One or more valid targets may be determined before a user selects atarget or a group of targets. A user may select one or more potentialtargets, and one or more valid targets may be identified from among theselected potential targets. FIG. 3 is an example of an initial selectionof a source for a graphical operation, from which one or moresemantically relevant targets may be identified. In contrast to FIG. 2,the procedure shown in FIGS. 3-4 may be performed before the useridentifies one or more targets for the graphical operation.

In FIG. 3, a graphical model of a system 300 includes destination blocks302, 304. Destination block 302 includes input ports 306, 308. A usermay wish to connect an output port 310 with one or more input ports ofthe destination block 302, but may not know which input ports are validtargets. Referring to FIG. 3, the user may select output port 310 toindicate this port 310 is an intended source of a graphical operation.The selection may be accomplished by moving the cursor 326 to thelocation of the output port 310 on a visual display of the graphicalmodel 300 and clicking on the output port 310. Alternatively, aselection may be received in some other way. For example, a selectioncould be indicated by keyboard input, hovering the cursor 326 over theport 310 for a certain period of time, voice commands, by dragging arectangle around the port 310 with the cursor 326, or some other way.

FIG. 4 depicts an example of a graphical operation in a graphical modelof a system in which semantically relevant target blocks are highlightedand semantically irrelevant target blocks are diminished.

The graphical model depicted in FIG. 4 includes a number of graphicalelements. Examples of graphical elements include the blocks 302 and 304and the ports 306, 308, 310, 330, 332, and 334. FIG. 4 depicts thegraphical model of FIG. 3 immediately after a user has selected thesource port 310 and begun to drag the cursor 326 to create a line 328extending from the source port 310.

In some graphical modeling environments, selecting a node and draggingthe cursor 326 may signify an initiation of a graphical operation. Forexample, a graphical operation may involve providing a signal from port310 to a target. Here, selecting port 310 and dragging cursor 326 in anoutward direction from port 310 may cause line 328 to be drawn. Line 328may represent the signal that may be provided by port 310. At the timethat the cursor 326 is initially dragged, as shown in FIG. 4, a targetfor the signal may not yet be identified.

A graphical operation may require a semantically valid target. Asemantically valid target may include a target that is semanticallycompatible with a particular source or graphical operation, given theparticular semantic context of the source, target, graphical operation,and/or the model of which they are a part. A semantically valid targetmay be capable of receiving the graphical operation from the source andaccurately interpreting information provided by the source.

A graphical operation may establish a relationship between a source anda target. Relationships may include logical connections between a sourceand a target which may allow the source to affect the target, orvice-versa. A relationship may be graphically represented in thegraphical model, for example, by a line that may connect the source tothe target. Examples of relationships may include, but are not limitedto, one-way data sharing, two-way data sharing, signals, transitions,and other relationships that may allow for manipulation of data betweentwo or more graphical elements in a graphical model.

The graphical operation depicted in FIG. 4 may be a drag-and-drop actionthat may involve dragging cursor 326 from a first graphical element (inthis case, source port 310) and dropping the first graphical elementonto a second graphical element to establish a relationship between thefirst graphical element and the second graphical element. The draggingmay be accomplished by moving mouse cursor 326 away from the source port310 while depressing a mouse button.

It should be noted that, while the graphical operation in this case mayinclude dragging and dropping, at the point in time shown in FIG. 4, thecursor 326 is being dragged but has not yet been dropped. “Dropping” maybe accomplished by releasing the mouse button when the cursor 326 isover an intended target. Because the cursor 326 has not yet beendropped, the graphical operation depicted in FIG. 4 has been initiated,but is not yet completed.

Other graphical operations are also possible and may be initiated in anumber of different ways. For example, a graphical operation may beinitiated using keyboard input, right clicking on graphical element,using a voice command, rotating a mouse wheel, and/or some other way ofinitiating a graphical operation.

After identifying the graphical operation, the semantically relevanttargets 306, 330, 332, 334 of the graphical operation may beprogrammatically identified. The identification of semantically validtargets will be discussed in more detail with respect to FIG. 5, below.After the semantically valid targets 306, 330, 332, 334 areprogrammatically identified, the semantically valid targets 306, 330,332, 334 may be highlighted. Note that highlighting a semantically validtarget is only one way to identify the semantically valid target. Otherways of identifying a target as semantically valid may be used. Forexample, the target may be identified as semantically valid by changingthe target's color, flashing the target on a display, surrounding thetarget using a visual cue, using arrows to point out the target,providing a pop-up textual annotation, or some other technique may beused for identifying the target as semantically valid. Note that one ormore auditory cues regarding semantically valid targets may also beprovided. In addition, semantically invalid or irrelevant targets may begraphically diminished. For example, port 408 may be dimmed to indicatethat it is an invalid or irrelevant target given the above graphicaloperation.

After the semantically valid targets 306, 330, 332, 334 have beenidentified, the user may choose one or more targets for the graphicaloperation. In the example depicted in FIG. 4, the user may move thecursor 326 over a target and release the mouse button, thus dropping thecursor 326 and completing the drag and drop operation. Other means ofspecifying a target may also be used, including keyboard input, voicecommands, rotating a mouse wheel, and left clicking or right clickingthe target, among other options.

When the targets for the graphical operation are identified, thegraphical operation may be performed. Performing the graphical operationmay cause a relationship to be established between the source graphicalelement (e.g., the source port 410) and the target graphical element.The relationship may be indicated by a graphical connection thatconnects the source graphical element with the target graphical element,such as a line between the source graphical element and the targetgraphical element.

The user may identify one or more sources of a graphical operation, andone or more targets of a graphical operation. If one source and onetarget are identified, the graphical operation may be referred to as a“one-to-one” graphical operation. If multiple sources and one target areidentified, the graphical operation may be referred to as a“many-to-one” graphical operation. If a single source is identified andmultiple targets are identified, the graphical operation may be referredto as a “one-to-many” graphical operation. If multiple sources andmultiple targets are identified, the graphical operation may be referredto as a “many-to-many” graphical operation. The graphical operation mayestablish a relationship between any semantically valid combination ofsources and targets.

If multiple sources are selected, the identified semantically validtargets may be identified so that each identified target may be asemantically valid target for all of the sources. Alternatively, theidentified semantically valid targets may each be a semantically validtarget for at least one of the identified sources.

If a user identifies a target of a graphical operation and signifiesthat more targets are desired (e.g., establishing a one-to-many ormany-to-many relationship), then the remaining semantically validtargets may be identified. More, fewer, or the same number ofsemantically valid targets may be compatible with the source, graphicaloperation, and the targets which have already been identified.

FIG. 5A is a flow chart of example acts that may be performed by anelectronic device for emphasizing semantically relevant concepts in agraphical model of a system.

At block 510, a plurality of graphical elements of a graphical model maybe displayed, for example, on a display device. The graphical model maybe displayed by a graphical modeling environment. The displayedgraphical model may be a graphical block diagram model. The graphicalelements may include one or more nodes such as blocks or states, lines,ports, or other graphical elements.

At 520, an indication of a graphical operation is received. Theindication may include receiving a selection of a first graphicalelement to be used in the graphical operation. The first graphicalelement may be either a source graphical element, or a target graphicalelement. Alternatively, a user may select a graphical operation from amenu, may indicate a graphical operation using keyboard input, or mayuse a mouse wheel to select a graphical operation. In other embodiments,the indication may include a mouse button event (such as a mouse buttondown event), hovering a cursor over the first graphical element,employing a voice command to indicate that a graphical operation shouldbe initiated, the initiation of a drag and drop operation, and/or otherindications indicating that a graphical operation should be initiated.

Note that the graphical operation may involve connecting a sourcegraphical element to a target graphical element using, for example, aline or establishing some other relationship between the sourcegraphical element and the target graphical element. For example,performing the graphical operation may cause a relationship to beestablished between the source graphical element and one or more othertarget graphical elements that are compatible with the graphicaloperation and/or the source graphical element. However, it should benoted that the graphical operation need not be performed at this stage;rather, only an indication of the graphical operation is received. Atblock 530, one or more target graphical elements of the plurality ofgraphical elements are identified. The one or more identified targetgraphical elements may be semantically valid targets of the graphicaloperation in that the identified target graphical elements may becompatible with the graphical operation and one or more characteristicsassociated with the source graphical element.

The graphical operation may be an editing operation, such as an additionor removal of a graphical element to or from the graphical model.Semantically valid targets may be identified based on an identity of theediting operation. For example, targets which may properly be edited bythe editing operation may be identified as semantically valid. Theidentity of the editing operation may be determined based on a userinput. Furthermore, the identity of the editing operation may bedetermined after receiving the selection of a source graphical element.

Alternatively, the semantically relevant targets of the graphical actionmay be identified based on one or more properties of the sourcegraphical element, one or more properties of the graphical operation,one or more properties of data associated with the source graphicalelement or the graphical operation, or a combination of properties. Forexample, the semantically valid targets may be identified based on oneor more properties of the potential targets that may be compatible withone or more properties of the source graphical element.

Examples of properties may include sample rates, data types, blocktypes, block properties, relationship properties, value ranges, sampletimes, dimensions, complexity, physical domains, communicationprotocols, and/or user-defined properties. Properties may be associatedwith, among other things, blocks, ports, lines, data, and graphicaloperations. The properties of a block may affect the dynamics of themodel using the block. One or more properties may be specified for oneor more input ports of the block, one or more output ports of the block,and/or the block as a whole. Examples of block properties are depictedin FIG. 5B.

Block properties 550 include block sample times 552 and restrictiveflags 554. Block sample times 552 may specify whether the blockcorresponds to an elemental, continuous, discrete, or hybrid dynamicsystem. If the block is an elemental discrete-time system, then theblock sample times 552 may specify a spacing between time instants atwhich a block response should be traced. A restrictive flag 554 maydisallow a use of blocks in certain modeling contexts. For example, therestrictive flag 554 may be used to impose a restriction that there beonly one instance of a given block in a model.

Block port properties 560 may specify one or more properties of datathat may either be available or produced at a particular port. Blockport properties 560 include dimension attributes 562, datatypes 564,sample rates 566, complexity attributes 568, unit attributes 570,physical domain attributes 572, and communication protocol attributes574. Dimension attributes 562 may include individual dimensions of amulti-dimensional matrix that may be used as a container for dataelements. Datatype attributes 564 may include a datatype of an elementof data in the data container. A sample rate attribute 566 may specifyhow a signal corresponding to an input or output port may be used. Acomplexity attribute 568 may be a flag that may be used to specifywhether a data element is real or complex. A unit attribute 570 mayinclude a unit of an element of data in the data container such as, forexample, a Système international d'unités (SI) unit. A physical domainattribute 572 may identify whether a port represents a mechanical,electrical, hydraulic, pneumatic, thermal, volume flow, etc., connectionor whether the variables of a port are, for example, across variables,through variables, efforts, flows, voltages, currents, forces,displacements, charges, etc. A communication protocol attribute 574 maybe identify whether a communication is based on, for example, apublish/subscribe, broadcast, multicast, or point-to-point protocol.

The properties may be identified based on a field associated with ablock. For example, a source port may be defined with a “type” field.Ports having the same type field or another compatible type field may besuitable for connection to the source port.

Further, if data is provided as a part of the graphical operation or asa consequence of the graphical operation, data properties 580 maydetermine compatibility between sources, targets, and graphicaloperations. Examples of data properties 580 that may be used todetermine compatibility may include data types 582, value ranges 584,and data dimensionality 586.

Referring back to FIG. 5A, at block 540, the identified semanticallyvalid graphical elements are visually indicated to be compatible withthe graphical operation on the display device. The visual appearance ofthe semantically valid graphical elements may be changed in some way.For example, the semantically valid graphical elements may behighlighted, valid graphical elements may change color, flash, vibrateand/or move, may be surrounded by a visual cue, a pop up textualannotation may appear, and/or arrows may be shown pointing to thesemantically valid targets, among other possibilities. Auditory cuesregarding semantically valid targets may also be provided. Moreover,semantically invalid or irrelevant targets may be indicated as such onthe display device by, for example, graphically diminishing their visualappearance on the display device.

The visual indication, at block 540, may be provided after theindication of a graphical operation is received at block 520, but beforethe graphical operation is actually performed. For example, the visualindication may be provided before the drop portion of a drag and dropoperation is performed. Likewise, for example, the visual indication maybe provided before the user identifies a target or a group of targetsfor the graphical operation.

If multiple graphical elements are identified as being suitable for thegraphical operation, the visual indication may indicate that each of theidentified graphical elements is suitable for the graphical operation.

As noted above, semantically valid targets may be identified at block530. FIG. 5C depicts block 530 of FIG. 5A in more detail.

Referring to FIG. 5C, at block 590, the identification of thesemantically valid targets may include searching among the graphicalelements of the model. The search may include, for example, searchingthe fields and/or properties of the graphical elements for one or moreproperties that are compatible with one or more properties of the sourcegraphical element.

At block 592 the search of the plurality of graphical elements may belimited based on, for example, a proximity of the source graphicalelement to a searched element on the display device. Here, graphicalelements which are near the source graphical element, in a visualrepresentation of the graphical model on a display device, may besearched. For example, the searched graphical elements may be adjacentto the source graphical element, with no graphical elements between thesource graphical element(s) and the searched graphical element.Alternatively, the searched graphical elements may be separated from thesource graphical element by a predetermined number of graphicalelements. The searched graphical elements may be a predetermineddistance away from the source graphical elements, such as apredetermined number of pixels on the visual representation.Alternatively, the search may begin with one or more graphical elementswhich may be closest to the source graphical element in the visualrepresentation and semantically valid targets may be presented to a useras they are identified in the search. The search may be limited based onspatial rules and/or semantic rules. Alternatively, the search mayexclude model elements that are related to the source graphical elementsby a number of interspersed model elements that is less than or greaterthan a certain value.

At block 594, the identification of the semantically valid targets maybe performed based on one or more rules. The rules, may be, for example,Object Constraint Language (OCL) rules, among other possibilities. Therules may relate one or more properties of the source graphical elementand/or the graphical operation to one or more properties of thepotential targets. The rules may specify that a given property or rangeof properties may be required to make a potential target a semanticallyvalid target. The rules may also specify that the presence of aparticular property in a potential target may render the potentialtarget semantically invalid for the graphical operation.

One or more of the rules may be established or configured by a user. Forexample, a user interface for adding one or more rules may be provided.The user interface may allow a user to specify a condition upon which atarget will be deemed valid or invalid. The condition may be associatedwith one or more properties of a source, a graphical operation, or atarget. The rules may be used in various combinations. For example, twoor more rules may be used in conjunction with one another (e.g., Rule Aand Rule B must both be satisfied in order for a potential target to besemantically valid or invalid). Alternatively, two or more rules may beused in the alternative (e.g., a potential target is semantically validor invalid if either of Rule A or Rule B is satisfied). The rules may bewritten as positive conditions (e.g., Rule A states that an Action N istaken if Condition C is satisfied) or as negative conditions (e.g., RuleA states that an Action N is taken if Condition C is not satisfied).

A library of rules, including default rules and user defined rules, maybe presented in an interface and a user may select which of the rules toapply.

At block 596 an annotation may be added to the model that may show whycertain targets are semantically valid or invalid. The annotation mayidentify, for example, which rules were satisfied and/or violated by thetarget. In one embodiment, the annotation may be a warning message thatindicates why a target is not semantically valid, and suggests changesthat could make the target semantically valid. Alternatively, thewarning message may indicate when a particular variable will be castinto another type in order to complete the graphical operation, whichmay result in the loss of information.

A graphical operation (such as an editing operation) may be changedbefore the user identifies a target or group of targets, or attempts toresolve the operation by establishing a relationship. Here, a new groupof semantically valid targets may be identified based on the newgraphical operation. Such an example is shown in FIGS. 6-7.

FIG. 6 depicts a graphical model of a system 600 in which a user isperforming a graphical operation that queries for semantically relevanttarget blocks. In the graphical model 600, two graphical blocks 602, 604are provided. The first graphical block 602 includes a number of ports,including input ports 606, 608, and 636. The second graphical 604 blockalso includes a number of ports, including input ports 630, 632, 634,and 640. In the example depicted in FIG. 6, a user wishes to perform agraphical operation with respect to an output port 610. Accordingly, theuser has selected the output port 610 using the cursor 626.

In FIG. 6, the user has identified the graphical operation as a queryoperation. The cursor 626 is visually changed to reflect an identity ofthe selected operation. In this case, the icon representing the cursor626 has changed to a query icon.

The graphical operation in FIG. 6 is accomplished through a drag anddrop operation. A line 628 appears to indicate that the cursor 626 isbeing dragged, but has not yet been dropped. When the cursor 626 isdropped, a new line will be established connecting the source outputport 610 to a semantically valid target.

Semantically valid targets for a query operation are identified andhighlighted in FIG. 6. For example, semantically valid targets of thequery operation may include input ports 606, 630, 632, and 634. Inputports 608, 636, 638, and 640 may be among semantically invalid targets,and their appearance may thus remain unchanged. Alternatively, theappearance of the semantically valid targets 606, 630, 632, and 634 mayremain unchanged, while the appearance of the semantically invalidtargets 608, 636, 638, and 640 may be changed.

In FIG. 7, the user has changed the graphical operation to be performed.In this case, the user has indicated that a call operation should beperformed instead of a query operation. Such a change may be made, forexample, after the output port 610 is selected but before the queryoperation is performed or a relationship between the output port 610 anda target is established.

In one example, the graphical operation is accomplished through a dragand drop operation. The type of graphical operation may be changed whilethe user is dragging the cursor but before the user drops the cursor(for example, by releasing a mouse button).

The change in the type of graphical operation may be accomplished viakeyboard input (for example, pressing the CTRL key on the keyboard), byrotating a mouse wheel, using a voice command, by shaking the mouse, orby any other suitable technique.

One or more of the above-described acts may be encoded ascomputer-executable instructions executable by processing logic. Thecomputer-executable instructions may be stored on one or morenon-transitory computer readable media. One or more of the abovedescribed acts may be performed in a suitably-programmed electronicdevice. FIG. 8A depicts an electronic computing device 800 that may besuitable for use with one or more acts disclosed herein.

The computing device 800 may take many forms, including but not limitedto a computer, workstation, server, network computer, quantum computer,optical computer, Internet appliance, mobile device, a pager, a tabletcomputer, a smart sensor, application specific processing device, etc.

The computing device 800 depicted in FIG. 8A is illustrative and maytake other forms. For example, an alternative implementation of thecomputing device 800 may have fewer components, more components, orcomponents that are in a configuration that differs from theconfiguration of FIG. 8A. The components of FIG. 8A and/or other figuresdescribed herein may be implemented using hardware based logic, softwarebased logic and/or logic that is a combination of hardware and softwarebased logic (e.g., hybrid logic); therefore, components illustrated inFIG. 8A and/or other figures are not limited to a specific type oflogic.

The processor 802 may include hardware or software based logic toexecute instructions on behalf of the computing device 800. In oneimplementation, the processor 802 may include one or more processors,such as a microprocessor. In one implementation, the processor 802 mayinclude hardware, such as a digital signal processor (DSP), a fieldprogrammable gate array (FPGA), a Graphics Processing Unit (GPU), anapplication specific integrated circuit (ASIC), a general-purposeprocessor (GPP), etc., on which at least a part of applications can beexecuted. In another implementation, the processor 802 may includesingle or multiple cores 803 for executing software stored in a memory804, or other programs for controlling the computing device 800.

The computing device 800 may include one or more tangible non-transitorycomputer-readable storage media for storing one or morecomputer-executable instructions or software that may implement one ormore embodiments of the invention. The memory 804 may include a computersystem memory or random access memory (RAM), such as dynamic RAM (DRAM),static RAM (SRAM), extended data out RAM (EDO RAM), etc. The memory 804may include other types of memory as well, or combinations thereof.

One or more processors 802 may include virtual machine (VM) 805 forexecuting the instructions loaded in the memory 804. A virtual machine805 may be provided to handle a process running on multiple processorsso that the process may appear to be using only one computing resourcerather than multiple computing resources. Virtualization may be employedin the computing device 800 so that infrastructure and resources in thecomputing device may be shared dynamically. Multiple VMs 805 may beresident on a single processor 802.

A hardware accelerator 806, may be implemented in an ASIC, FPGA, or someother device. Hardware accelerator 806 may be used to speed up thegeneral processing rate of the computing device 800.

The computing device 800 may include a network interface 808 tointerface to a Local Area Network (LAN), Wide Area Network (WAN) or theInternet through a variety of connections including, but not limited to,standard telephone lines, LAN or WAN links (e.g., T1, T3, 56 kb, X.25),broadband connections (e.g., integrated services digital network (ISDN),Frame Relay, asynchronous transfer mode (ATM), wireless connections(e.g., 802.11), high-speed interconnects (e.g., InfiniBand, gigabitEthernet, Myrinet) or some combination of any or all of the above. Thenetwork interface 808 may include a built-in network adapter, networkinterface card, personal computer memory card international association(PCMCIA) network card, card bus network adapter, wireless networkadapter, universal serial bus (USB) network adapter, modem or any otherdevice suitable for interfacing the computing device 800 to any type ofnetwork capable of communication and performing the operations describedherein.

The computing device 800 may include one or more input devices 810, suchas a keyboard, a multi-point touch interface, a pointing device (e.g., amouse), a gyroscope, an accelerometer, a haptic device, a tactiledevice, a neural device, a microphone, or a camera, that may be used toreceive input from, for example, a user. Note that computing device 800may include other suitable I/O peripherals.

The input devices 810 may be allow a user to provide input that isregistered on a visual display device 814. A graphical user interface(GUI) 816 may be shown on the display device 814.

A storage device 818 may also be associated with the computer 800. Thestorage device 818 may be, for example, a hard-drive, CD-ROM or DVD, ZipDrive, tape drive, or other suitable tangible computer readable storagemedium capable of storing information. The storage device 818 may beuseful for storing application software programs, such as a modelingapplication or environment 820 (which may be, for example the Simulink®environment) including a model 822, and for storing a repository 824 andan operating system (OS). Note that the software programs may includecomputer-executable instructions that may implement one or moreembodiments of the invention.

The computing device 800 can be running an operating system (OS) 826.Examples of OS 826 may include the Microsoft® Windows® operatingsystems, the Unix and Linux operating systems, the MacOS® for Macintoshcomputers, an embedded operating system, such as the Symbian OS, areal-time operating system, an open source operating system, aproprietary operating system, operating systems for mobile computingdevices, or other operating system capable of running on the computingdevice and performing the operations described herein. The operatingsystem may be running in native mode or emulated mode.

One or more embodiments of the invention may be implemented usingcomputer-executable instructions and/or data that may be embodied on oneor more non-transitory tangible computer-readable mediums. The mediumsmay be, but are not limited to, a hard disk, a compact disc, a digitalversatile disc, a flash memory card, a Programmable Read Only Memory(PROM), a Random Access Memory (RAM), a Read Only Memory (ROM),Magnetoresistive Random Access Memory (MRAM), a magnetic tape, or othercomputer-readable media.

One or more embodiments of the invention may be implemented in aprogramming language. Some examples of languages that may be usedinclude, but are not limited to, Python, C, C++, C#, Java, Javascript, ahardware description language (HDL), unified modeling language (UML),and Programmable Logic Controller (PLC) languages. Further, one or moreembodiments of the invention may be implemented in a hardwaredescription language or other language that may allow prescribingcomputation. One or more embodiments of the invention may be stored onor in one or more mediums as object code. Instructions that mayimplement one or more embodiments of the invention may be executed byone or more processors. Portions of the invention may be in instructionsthat execute on one or more hardware components other than a processor.

FIG. 8B depicts modeling environment 820 and repository 824 of FIG. 8Ain more detail. The modeling environment 820 may include an editor,which may allow a user to create and modify a block diagram modelrepresenting a dynamic system.

The modeling environment 820 may also allow a user to create and storedata relating to graphical entities. The modeling environment mayinclude a textual interface that supports a set of commands that mayallow interaction with the editor. Using this textual interface, theuser may write special scripts that may perform automatic editingoperations on a block diagram of a model. The user may interact with oneor more windows that may act as canvases for the model. The model may bepartitioned into multiple hierarchical levels through the use ofsubsystems and different levels of the model's hierarchy may bedisplayed in different canvases.

One or more interface tools within the modeling environment 820 may beused by a user to create a block diagram model. For example, theinterface tools may include a block palette, a wiring line connectiontool, an annotation tool, a formatting tool, an attribute editing tool,a save/load tool and a publishing tool. The block palette may include alibrary of pre-defined blocks that may be available to the user forbuilding the block diagram. The palette may be customized by the userto: (a) reorganize one or more blocks in some custom format, (b) deleteone or more blocks, and/or (c) add one or more custom blocks that theuser may have designed. The palette may allow one or more blocks to bedragged using a human-machine interface (such as a mouse or keyboard)from the palette on to a canvas that may be displayed in a window.

The modeling environment 820 may run under the control of an operatingsystem, such as OS 826. The modeling environment 820 may enable, forexample, a user to build and execute a model 852 of a system. Themodeling environment 820 may include a text-based modeling environment,a graphical modeling environment, or some other modeling environment.Examples of modeling environments that may implement one or moreembodiments of the invention may include MATLAB® and Simulink®,Stateflow®, Simscape™, and SimMechanics™ which are available from TheMathWorks, Inc.; LabVIEW® or MATRIXx available from NationalInstruments, Inc; Mathematica® available from Wolfram Research, Inc.;Mathcad available from Mathsoft Engineering & Education Inc.; Maple™available from Maplesoft, a division of Waterloo Maple Inc.; Poseidonfor UML by Gentleware, AG of Hamburg, Germany; MagicDraw by NoMagic,Inc., of Plano, Texas; Comsol available from Comsol AB of Sweden;Scilab™ available from The French National Institution for Research inComputer Science and Control (INRIA), Le Chesnay Cedex, France; and GNUOctave, available from the GNU Project; SoftWIRE available fromMeasurement Computing; VisSim available from Visual Solutions; WiTavailable from DALSA Coreco; VEE Pro available from Agilent; Dymolaavailable from Dynasim AB; Extend available from Imagine That, Inc.;Scicos available from The French National Institution for Research inComputer Science and Control (INRIA); MSC.Adams® available fromMSC.Software Corporation; Rhapsody® and Rational® available fromInternational Business Machines Corporation; ARTiSAN Studio availablefrom ARTiSAN Software Tools, Inc.; and SCADE™ from Esterel Technologies,Inc.

In the modeling environment 820, one or more instructions may begenerated for the model 822. The instructions may be, for example sourcecode, intermediate representations, etc., to be used to simulate themodel or to execute the model on a target device. The generatedinstructions may be stored in a repository 824. The modeling environment820 may enable processing the model 822 using the instructionspreviously stored in the repository 824.

Modeling environment 820 may communicate with repository 824. Modelingenvironment 800 may generate instructions for model 822 and store theinstructions in the repository 824. The instructions may be stored inthe repository 824, for example, as functions 856 in software. Note thatthe instructions may be stored in the repository 824 other forms, suchas processes that may be implemented in hardware. The instructionsstored in the repository 824 may be shared in processing other models toreduce memory or other requirements for processing other models.

The repository 824 may include a collection of information that may bestored in memory or storage. The repository 824 may be, for example, adatabase with code for functions and checksums for one or more of thefunctions.

The modeling environment 820 may also include user interfaces 858 and anexecution engine 860. The modeling environment 820 may allow a user tobuild model 822 of a system using user interfaces 858. The model 822 mayinclude, for example, blocks and lines. The blocks may defineoperations, and the lines may define relationships between the blocks.

The execution engine 860 may compile and link the model 822 to generatean executable form of instructions for carrying out execution of themodel. The model 822 may be executed to simulate the system representedby the model 822. The simulation of the model 822 may determine thebehavior of the system represented by the model 822.

The execution engine 860 may convert the model into an executable form.The executable form may include one or more executable instructions. Theexecution engine 860 may compile and link the model to produce theexecutable form of the model. The executable form of the model may beexecuted to determine a behavior of the model. Compiling may involvechecking an integrity and validity of one or more componentinterconnections in the model. Here, the execution engine 860 may alsosort one or more components in the model into hierarchical lists thatmay be used to create one or more component method execution lists. Whenlinking the model, the execution engine 860 may use one or more resultsfrom the compilation of the model to, for example, allocate memory thatmay be needed for an execution of the executable form of the model.Linking may also involve producing one or more component methodexecution lists that may be used in the execution of the executableform. The block method execution lists may be generated because thecomponents of a model may execute component methods by type (not bycomponent) when the component has a sample hit. The execution engine 860may repetitively execute the instructions e.g., via successive timesteps from an execution start time to a stop time specified by the useror until the execution is interrupted.

The execution engine 860 may enable interpretive execution of part orall of the model. Likewise, the execution engine 860 may enable compiledor accelerated execution of some or all of the model. Combinations ofinterpretive and compiled or accelerated execution may also be enabledby the execution engine 860.

The semantic engine 862 may identify semantically relevant objects inthe model 822 and apply visual indications to the model 822 based on theidentification of semantically relevant objects. The semantic engine 862may perform one or more acts depicted in FIGS. 5A-5C.

FIG. 9 depicts a network implementation that may implement one or moreembodiments of the invention. A system 900 may include a computingdevice 800 a network 912, a service provider 913, a target environment914, and a cluster 915. The embodiment of FIG. 9 is exemplary, and otherembodiments can include more devices, fewer devices, or devices inarrangements that differ from the arrangement of FIG. 9.

The network 912 may transport data from a source to a destination.Embodiments of the network 912 may use network devices, such as routers,switches, firewalls, and/or servers (not shown) and connections (e.g.,links) to transport data. ‘Data,’ as used herein, may refer to any typeof machine-readable information having substantially any format that maybe adapted for use in one or more networks and/or with one or moredevices (e.g., the computer 900, the service provider 913, etc.). Datamay include digital information or analog information. Data may furtherbe packetized and/or non-packetized.

The network 912 may be a hardwired network using wired conductors and/oroptical fibers and/or may be a wireless network using free-spaceoptical, radio frequency (RF), and/or acoustic transmission paths. Inone implementation, the network 912 may be a substantially open publicnetwork, such as the Internet. In another implementation, the network912 may be a more restricted network, such as a corporate virtualnetwork. The network 912 may include Internet, intranet, Local AreaNetwork (LAN), Wide Area Network (WAN), Metropolitan Area Network (MAN),wireless network (e.g., using IEEE 802.11, Bluetooth, etc.), etc. Thenetwork 912 may use middleware, such as Common Object Request BrokerArchitecture (CORBA) or Distributed Component Object Model (DCOM).Implementations of networks and/or devices operating on networksdescribed herein are not limited to any particular data type, protocol,architecture/configuration, etc.

The service provider 913 may include a device that makes a serviceavailable to another device. For example, the service provider 913 mayinclude an entity (e.g., an individual, a corporation, an educationalinstitution, a government agency, etc.) that provides one or moreservices to a destination using a server and/or other devices. Servicesmay include instructions that are executed by a destination to performan operation (e.g., an optimization operation). Alternatively, a servicemay include instructions that are executed on behalf of a destination toperform an operation on the destination's behalf.

The target environment 914 may include a device that receivesinformation over the network 912. For example, the target environment914 may be a device that receives user input from the computer 910.

The cluster 915 may include a number of units of execution (UEs) 916 andmay perform processing on behalf of the computer 900 and/or anotherdevice, such as the service provider 913. For example, the cluster 915may perform parallel processing on an operation received from thecomputer 900. The cluster 915 may include UEs 916 that reside on asingle device or chip or that reside on a number of devices or chips.

The units of execution (UEs) 916 may include processing devices thatperform operations on behalf of a device, such as a requesting device. AUE may be a microprocessor, field programmable gate array (FPGA), and/oranother type of processing device. UE 916 may include code, such as codefor an operating environment. For example, a UE may run a portion of anoperating environment that pertains to parallel processing activities.The service provider 913 may operate the cluster 915 and may provideinteractive optimization capabilities to the computer 910 on asubscription basis (e.g., via a web service).

Units of Execution (UEs) provide remote/distributed processingcapabilities for our products, such as MATLAB® from The MathWorks, Inc.A hardware unit of execution may include a device (e.g., a hardwareresource) that may perform and/or participate in parallel programmingactivities. For example, a hardware unit of execution may perform and/orparticipate in parallel programming activities in response to a requestand/or a task it has received (e.g., received directly or via a proxy).A hardware unit of execution may perform and/or participate insubstantially any type of parallel programming (e.g., task, data, streamprocessing, etc.) using one or more devices. For example, a hardwareunit of execution may include a single processing device that includesmultiple cores or a number of processors. A hardware unit of executionmay also be a programmable device, such as a field programmable gatearray (FPGA), an application specific integrated circuit (ASIC), adigital signal processor (DSP), or other programmable device. Devicesused in a hardware unit of execution may be arranged in many differentconfigurations (or topologies), such as a grid, ring, star, or otherconfiguration. A hardware unit of execution may support one or morethreads (or processes) when performing processing operations.

A software unit of execution may include a software resource (e.g., atechnical computing environment) that may perform and/or participate inone or more parallel programming activities. A software unit ofexecution may perform and/or participate in one or more parallelprogramming activities in response to a receipt of a program and/or oneor more portions of the program. A software unit of execution mayperform and/or participate in different types of parallel programmingusing one or more hardware units of execution. A software unit ofexecution may support one or more threads and/or processes whenperforming processing operations.

The term ‘parallel programming’ may be understood to include multipletypes of parallel programming, e.g. task parallel programming, dataparallel programming, and stream parallel programming. Parallelprogramming may include various types of processing that may bedistributed across multiple resources (e.g., software units ofexecution, hardware units of execution, processors, microprocessors,clusters, labs) and may be performed at the same time.

For example, parallel programming may include task parallel programmingwhere a number of tasks may be processed at the same time on a number ofsoftware units of execution. In task parallel programming, a task may beprocessed independently of other tasks executing, for example, at thesame time.

Parallel programming may include data parallel programming, where data(e.g., a data set) may be parsed into a number of portions that may beexecuted in parallel using, for example, software units of execution. Indata parallel programming, the software units of execution and/or thedata portions may communicate with each other as processing progresses.

Parallel programming may include stream parallel programming (alsoreferred to as pipeline parallel programming). Stream parallelprogramming may use a number of software units of execution arranged,for example, in series (e.g., a line) where a first software unit ofexecution may produce a first result that may be fed to a secondsoftware unit of execution that may produce a second result given thefirst result. Stream parallel programming may also include a state wheretask allocation may be expressed in a directed acyclic graph (DAG) or acyclic graph.

Other parallel programming techniques may involve some combination oftask, data, and/or stream parallel programming techniques alone or withother types of processing techniques to form hybrid-parallel programmingtechniques.

The foregoing description may provide illustration and description ofvarious embodiments of the invention, but is not intended to beexhaustive or to limit the invention to the precise form disclosed.Modifications and variations may be possible in light of the aboveteachings or may be acquired from practice of the invention. Forexample, while a series of acts has been described above, the order ofthe acts may be modified in other implementations consistent with theprinciples of the invention. Further, non-dependent acts may beperformed in parallel.

In addition, one or more implementations consistent with principles ofthe invention may be implemented using one or more devices and/orconfigurations other than those illustrated in the Figures and describedin the Specification without departing from the spirit of the invention.One or more devices and/or components may be added and/or removed fromthe implementations of the figures depending on specific deploymentsand/or applications. Also, one or more disclosed implementations may notbe limited to a specific combination of hardware.

Furthermore, certain portions of the invention may be implemented aslogic that may perform one or more functions. This logic may includehardware, such as hardwired logic, an application-specific integratedcircuit, a field programmable gate array, a microprocessor, software, ora combination of hardware and software.

No element, act, or instruction used in the description of the inventionshould be construed critical or essential to the invention unlessexplicitly described as such. Also, as used herein, the article “a” isintended to include one or more items. Where only one item is intended,the term “a single” or similar language is used. Further, the phrase“based on,” as used herein is intended to mean “based, at least in part,on” unless explicitly stated otherwise. In addition, the term “user”, asused herein, is intended to be broadly interpreted to include, forexample, a computing device (e.g., a workstation) or a user of acomputing device, unless otherwise stated.

The scope of the invention is defined by the claims and theirequivalents.

1. An electronic device implemented method, comprising: displaying a plurality of graphical elements of a graphical model on a display device; receiving an indication of a graphical operation involving a first graphical element of the plurality of graphical elements, the graphical operation when performed establishes a relationship between the first graphical element and one or more other graphical elements of the plurality of graphical elements that are compatible with the graphical operation; identifying two or more graphical elements of the plurality of graphical elements that are compatible with: the graphical operation, and one or more characteristics associated with the first graphical element; and visually indicating the identified plurality of graphical elements are compatible with the graphical operation on the display device.
 2. The method of claim 1, wherein the graphical model is a graphical block diagram model.
 3. The method of claim 2, wherein the first graphical element is a port in a graphical block diagram model.
 4. The method of claim 1, further comprising performing the graphical operation, wherein the performing causes a relationship to be established between the first graphical element and the second graphical element, the relationship being indicated on a display by a graphical connection that connects the first graphical element with the second graphical element.
 5. The method of claim 1, wherein the graphical operation is a drag-and-drop action that involves selecting the first graphical element using a cursor, dragging the cursor, and dropping the cursor onto the second graphical element to establish the relationship between the first graphical element and the second graphical element.
 6. The method of claim 1, further comprising: identifying one or more properties of the first graphical element; and identifying the second graphical element based on one or more properties of the second graphical element that are compatible with one or more properties of the first graphical element.
 7. The method of claim 6, wherein identifying the second graphical element further comprises: searching among the plurality of graphical elements, wherein the search of the plurality of graphical elements is limited based on a proximity of the first graphical element to a searched element on the display device.
 8. The method of claim 1, wherein receiving an indication further comprises: receiving a selection of the first graphical element.
 9. The method of claim 1, wherein visually indicating whether the second graphical element is suitable for the graphical operation is performed after the indication is received and before the graphical operation is resolved by attempting to establish the relationship.
 10. The method of claim 1, further comprising: identifying a plurality of graphical elements that are suitable for the graphical operation; and visually indicating, on the display device, that each of the identified plurality of graphical elements is suitable for the graphical operation.
 11. The method of claim 1, wherein the graphical operation establishes the relationship between a plurality of graphical elements and a second plurality of graphical elements.
 12. The method of claim 1, wherein visually indicating further comprises highlighting the second graphical element.
 13. The method of claim 1, wherein an incompatible graphical element in the plurality of graphical elements is not compatible with the graphical operation and wherein visually indicating further comprises changing a visual appearance of the incompatible graphical element on the display device.
 14. The method of claim 1, further comprising: identifying whether the second graphical element is suitable for the graphical operation based on one or more rules.
 15. The method of claim 14, wherein one or more of the rules are established by a user.
 16. The method of claim 1, further comprising: identifying the degree of compatibility.
 17. The method of claim 16, wherein the visual indicating accounts for the degree of compatibility.
 18. One or more non-transitory computer-readable storage media for storing computer-executable instructions executable by processing logic, the media storing one or more instructions for: displaying a plurality of graphical elements of a graphical model on a display device; receiving an indication to initiate a graphical operation involving a first graphical element of the plurality of graphical elements, the graphical operation when performed establishes a relationship between the first graphical element and one or more other graphical elements of the plurality of graphical elements that are compatible with the graphical operation; and visually indicating whether a second graphical element of the plurality of graphical elements is suitable for the graphical operation on the display device prior to conducting the graphical operation.
 19. The media of claim 18, further storing one or more instructions for: identifying one or more properties of the first graphical element; and identifying the second graphical element based on one or more properties of the second graphical element that are compatible with one or more properties of the first graphical element.
 20. The media of claim 18, further storing one or more instructions for: identifying a plurality of graphical elements that are suitable for the graphical operation; and visually indicating, on the display device, that each of the identified plurality of graphical elements is suitable for the graphical operation.
 21. The media of claim 18, wherein visually indicating further comprises: highlighting one or more compatible graphical elements.
 22. The media of claim 18, wherein an incompatible graphical element in the plurality of graphical elements is not compatible with the graphical operation and wherein visually indicating further comprises: changing a visual appearance of the incompatible graphical element on the display device.
 23. The media of claim 18, further storing one or more instructions for: identifying whether the second graphical element is suitable for the graphical operation based on one or more rules.
 24. A system comprising: a display device; and a processor for: displaying a plurality of graphical elements of a model on the display device; receiving an indication to initiate a graphical operation to establish a relationship between a first graphical element of the displayed plurality of graphical elements and another graphical element of the displayed plurality of graphical elements that is compatible with the graphical operation; and visually indicating whether a second graphical element is compatible with the graphical operation on the display device prior to performing the graphical action.
 25. An electronic device implemented method, comprising: receiving a selection of a first graphical element in a graphical block diagram of a model; identifying a second graphical element in the graphical block diagram that is compatible with the first element with respect to an editing operation, the identifying performed based on an identity of editing operation; and visually indicating that the second graphical element is compatible with the first graphical element with respect to the editing operation in the graphical block diagram.
 26. The method of claim 25, wherein the identity of the editing operation is determined based on a user input.
 27. The method of claim 25, wherein the editing operation is determined after receiving the selection of the first graphical element.
 28. The method of claim 27, wherein the editing operation is modified before the second graphical element is identified. 